import { request } from '@/utils/request';

const Api = {
  list: '/setting/base/list',
  info: '/setting/base/',
  add: '/setting/base',
  dictionaries: '/system/dict/data/type/default_language',
  langList: '/setting/lang/list',
};

// 查询基本设置详细
export function getSetting() {
  return request.get({
    url: Api.add,
  });
}

// 新增基本设置
export function addSetting(data: any) {
  return request.post({
    url: Api.add,
    data,
  });
}

// 修改基本设置
export function updateSetting(data: any) {
  return request.put({
    url: Api.add,
    data,
  });
}

// 字典
export function getDictionaries(params: any) {
  return request.get({
    url: Api.langList,
    params,
  });
}
